import request from '@/utils/request'

// 查询列表
export function GetListAPI(params) {
  return request({
    url: '/equipment/maintenance-project/list',
    method: 'GET',
    params
  })
}

// 新增设备知识库
export function AddDataAPI(data) {
  return request({
    url: '/equipment/repair/add',
    method: 'POST',
    data
  })
}

// 修改知识库
export function EditDataAPI(data) {
  return request({
    url: '/equipment/repair/edit',
    method: 'PUT',
    data
  })
}

// 查询单个
export function GetDeiltsAPI(params) {
  return request({
    url: '/equipment/repair/' + params,
    method: 'GET'
  })
}

// 删除单个
export function DelDataAPI(params) {
  return request({
    url: '/equipment/repair/' + params,
    method: 'DELETE'
  })
}

// 派工
export function DispatchAPI(data) {
  return request({
    url: '/equipment/repair/dispatch',
    method: 'PUT',
    data
  })
}

// 执行维修
export function MaintenanceAPI(data) {
  return request({
    url: '/equipment/repair/maintenance',
    method: 'PUT',
    data
  })
}

// 提交审核
export function SubmitAPI(data) {
  return request({
    url: '/equipment/repair/submit/' + data,
    method: 'PUT'
  })
}

// 提交审核
export function AuditAPI(data) {
  return request({
    url: '/equipment/repair/audit',
    method: 'PUT',
    data
  })
}
